﻿/**
 *
 * @file FITKAbaqusHDF5AdaptorInertia.h
 * @brief 读写HDF5文件的Inertia类
 * @author fulipeng (fulipengqd@yeah.net)
 * @date 2024-06-20
 *
 */
#ifndef  _FITKABAQUSHDF5ADAPTORINERTIA_H__
#define  _FITKABAQUSHDF5ADAPTORINERTIA_H__

#include "FITKAbaqusIOHDF5API.h"
#include "FITKAbaqusHDF5AbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"
#include "FITK_Interface/FITKInterfaceIOHDF5/FITKInterfaceHDF5AdaptorBoundaryLocation.h"

 //前置声明
ForwardDeclarNS(Interface, FITKAbaAbstractInertia)

namespace IO
{
    /**
     * @brief HDF5 Inertia (惯量)读写适配器
     * @author fulipeng (fulipengqd@yeah.net)
     * @date 2024-06-20
     */
    class FITKABAQUSIOHDF5API FITKAbaqusHDF5AdaptorInertia : public FITKInterfaceHDF5AdaptorBoundaryLocation
    {
    public:
        explicit FITKAbaqusHDF5AdaptorInertia() = default;
        virtual ~FITKAbaqusHDF5AdaptorInertia() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool adaptW() override;

        /**
         * @brief 读取惯量
         * @param inertia 惯量基类
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool readInertia(Interface::FITKAbaAbstractInertia* inertia, H5::Group & h5Group);

        /**
         * @brief 写出惯量
         * @param inertia 惯量基类
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool writeInertia(Interface::FITKAbaAbstractInertia* inertia, H5::Group & h5Group);

        /**
         * @brief 读取惯量
         * @param inertia 惯量基类
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool readPointMassInertia(Interface::FITKAbaAbstractInertia* inertia, H5::Group & h5Group);

        /**
         * @brief 写出惯量
         * @param inertia 惯量基类
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool writePointMassInertia(Interface::FITKAbaAbstractInertia* inertia, H5::Group & h5Group);
        

    };

    Register2FITKIOAdaptorFactory(HDF5, Interface::FITKAbaAbstractInertia, FITKAbaqusHDF5AdaptorInertia)

}

#endif
